<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>精灵图使用</title>
    <style>
        .w {
            width: 60px;
            height: 60px;
            margin: 100px auto;
            background-color: pink;
        }
        
        .box1 {
            background: url(#) no-repeat -182px 0;
        }
        
        .box2 {
            background: url(#) no-repeat -155px -106px;
        }
    </style>
</head>

<body>
    <div class="w box1"></div>
    <div class="w box2"></div>
</body>

</html>